const photowall = require('../../modules/photowall')

module.exports = (req, res) => {
  let limit = req.query.limit
  photowall.getPhoto(limit).then(suc => {
    return res.status(200).json({data: suc, code: 200})
  }).catch(err => {
    console.log(err);
    return res.status(200).json({msg: '服务器返回错误，请稍后再试', code: 500})
  })
}